<template>
  <footer class="app-footer">
    <div class="container">
      <div class="footer-content">
        <!-- 主要信息 -->
        <div class="footer-main">
          <div class="footer-section">
            <h4 class="section-title">海外文学网</h4>
            <p class="section-desc">
              致力于为全球读者提供优质的中文文学作品，传播中华文化精髓。
            </p>
          </div>
          
          <div class="footer-section">
            <h4 class="section-title">快速导航</h4>
            <ul class="footer-links">
              <li><router-link to="/">首页</router-link></li>
              <li><router-link to="/library">书库浏览</router-link></li>
              <li><router-link to="/search">搜索</router-link></li>
              <li><router-link to="/bookshelf" v-if="userStore.isLoggedIn">我的书架</router-link></li>
            </ul>
          </div>
          
          <div class="footer-section">
            <h4 class="section-title">用户服务</h4>
            <ul class="footer-links">
              <li><a href="#" @click.prevent>帮助中心</a></li>
              <li><a href="#" @click.prevent>意见反馈</a></li>
              <li><a href="#" @click.prevent>联系我们</a></li>
              <li><a href="#" @click.prevent>用户协议</a></li>
            </ul>
          </div>
          
          <div class="footer-section">
            <h4 class="section-title">关注我们</h4>
            <div class="social-links">
              <el-button type="text" class="social-btn">
                <el-icon><Message /></el-icon>
                微信
              </el-button>
              <el-button type="text" class="social-btn">
                <el-icon><ChatDotRound /></el-icon>
                QQ群
              </el-button>
              <el-button type="text" class="social-btn">
                <el-icon><Connection /></el-icon>
                微博
              </el-button>
            </div>
          </div>
        </div>
        
        <!-- 版权信息 -->
        <div class="footer-bottom">
          <div class="copyright">
            <p>&copy; 2024 海外文学网. All rights reserved.</p>
            <p>本站所有内容均为虚构，仅供演示使用</p>
          </div>
          
          <div class="footer-info">
            <span>当前语言: {{ appStore.isZhCN ? '中文' : 'English' }}</span>
            <span>主题: {{ appStore.isDark ? '夜间模式' : '日间模式' }}</span>
          </div>
        </div>
      </div>
    </div>
  </footer>
</template>

<script setup lang="ts">
import { useAppStore } from '@/stores/app'
import { useUserStore } from '@/stores/user'

const appStore = useAppStore()
const userStore = useUserStore()
</script>

<style lang="scss" scoped>
.app-footer {
  background: linear-gradient(135deg, var(--bg-tertiary), var(--bg-secondary));
  border-top: 1px solid var(--border-color);
  margin-top: auto;
}

.footer-content {
  padding: var(--spacing-2xl) 0 var(--spacing-lg);
}

.footer-main {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
  gap: var(--spacing-xl);
  margin-bottom: var(--spacing-xl);
}

.footer-section {
  .section-title {
    color: var(--text-primary);
    font-size: var(--font-size-lg);
    font-weight: 600;
    margin-bottom: var(--spacing-md);
  }
  
  .section-desc {
    color: var(--text-secondary);
    line-height: var(--line-height-relaxed);
    font-size: var(--font-size-sm);
  }
}

.footer-links {
  list-style: none;
  padding: 0;
  margin: 0;
  
  li {
    margin-bottom: var(--spacing-sm);
    
    a {
      color: var(--text-secondary);
      text-decoration: none;
      font-size: var(--font-size-sm);
      transition: color 0.3s ease;
      
      &:hover {
        color: var(--primary-color);
      }
    }
  }
}

.social-links {
  display: flex;
  flex-direction: column;
  gap: var(--spacing-sm);
  
  .social-btn {
    justify-content: flex-start;
    color: var(--text-secondary) !important;
    padding: var(--spacing-xs) 0 !important;
    
    &:hover {
      color: var(--primary-color) !important;
    }
  }
}

.footer-bottom {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding-top: var(--spacing-lg);
  border-top: 1px solid var(--border-color);
  flex-wrap: wrap;
  gap: var(--spacing-md);
}

.copyright {
  p {
    color: var(--text-tertiary);
    font-size: var(--font-size-xs);
    margin-bottom: var(--spacing-xs);
    
    &:last-child {
      margin-bottom: 0;
    }
  }
}

.footer-info {
  display: flex;
  gap: var(--spacing-lg);
  
  span {
    color: var(--text-tertiary);
    font-size: var(--font-size-xs);
  }
}

// 响应式设计
@media (max-width: 768px) {
  .footer-main {
    grid-template-columns: repeat(2, 1fr);
    gap: var(--spacing-lg);
  }
  
  .footer-bottom {
    flex-direction: column;
    text-align: center;
  }
  
  .footer-info {
    flex-direction: column;
    gap: var(--spacing-xs);
  }
}

@media (max-width: 480px) {
  .footer-main {
    grid-template-columns: 1fr;
  }
  
  .footer-content {
    padding: var(--spacing-xl) 0 var(--spacing-md);
  }
}
</style> 